<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script src="./socket.js"></script>
<script type="text/javascript">
    
    window.onload = function () {
        socket.connect("ws://127.0.0.1:8080/echo",function(){
            console.log("Connection open ...");
            socket.send({Content:"hello world"});
        },function(evt){
            console.log("Connection closed.");
        },function(evt){
            var msg = JSON.parse(evt.data);
            console.log(msg);      
        });
    }
</script>
</body>
</html>